---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/jesse/Dropbox/voter_id/Replication/figure1_and_a2.log
  log type:  text
 opened on:  17 Aug 2020, 09:30:06

. 
. use "$path/provisional_ballots.dta", clear

. 
. keep if general == 0
(127,000 observations deleted)

. gen count = 1

. collapse (sum) count, by(reason year)

. egen total_by_year = sum(count), by(year)

. gen rate = count / total_by_year

. sort year reason

. replace reason = "INCORRECT PRECINCT" if reason == "INCORRECT PRECINCT / UNREPORTED MOVE"
(5 real changes made)

. 
. binscatter rate year, by(reason) linetype(connect) ///
>         xtitle("") ytitle("Share of Provisional Ballots")  ///
>         legend(position(6) rows(2) size(vsmall) order(1 2 3 5 4) ///
>         lab(1 "ID NOT PROVIDED") lab(2 "INCORRECT PRECINCT") lab(3 "NOT REGISTERED") ///
>         lab(5 "PREVIOUSLY REMOVED") lab(4 "OTHER")) ///
>         xsize(5) ysize(5)

.         
. graph export "$path/figure_a2_left.pdf", replace
(file ~/Dropbox/voter_id/Replication/figure_a2_left.pdf written in PDF format)

. 
. keep if reason == "ID NOT PROVIDED" | reason == "NOT REGISTERED"
(15 observations deleted)

. 
. binscatter rate year, by(reason) linetype(connect) ///
>         xtitle("") ytitle("Share of Provisional Ballots") ///
>         scale(1.3) text(0.65 2014 "Not Registered") ///
>         text(0.1 2014 "ID Not Provided") legend(off) ///
>         lcolor(black) mcolor(black)

.         
. graph export "$path/figure_1_left.pdf", replace
(file ~/Dropbox/voter_id/Replication/figure_1_left.pdf written in PDF format)

. 
. 
. use "$path/provisional_ballots.dta", clear

. 
. keep if general == 1
(30,900 observations deleted)

. gen count = 1

. collapse (sum) count, by(reason year)

. egen total_by_year = sum(count), by(year)

. gen rate = count / total_by_year

. sort year reason

. replace reason = "INCORRECT PRECINCT" if reason == "INCORRECT PRECINCT / UNREPORTED MOVE"
(6 real changes made)

. 
. binscatter rate year, by(reason) linetype(connect) ///
>         xtitle("") ytitle("Share of Provisional Ballots")  ///
>         legend(position(6) rows(2) size(vsmall) order(1 2 3 5 4) ///
>         lab(1 "ID NOT PROVIDED") lab(2 "INCORRECT PRECINCT") lab(3 "NOT REGISTERED") ///
>         lab(5 "PREVIOUSLY REMOVED") lab(4 "OTHER")) ///
>         xsize(5) ysize(5)

.         
. graph export "$path/figure_a2_right.pdf", replace
(file ~/Dropbox/voter_id/Replication/figure_a2_right.pdf written in PDF format)

. 
. keep if reason == "ID NOT PROVIDED" | reason == "NOT REGISTERED"
(18 observations deleted)

. 
. binscatter rate year, by(reason) linetype(connect) ///
>         xtitle("") ytitle("Share of Provisional Ballots") ///
>         scale(1.3) text(0.77 2013.7 "Not Registered") ///
>         text(0.1 2014 "ID Not Provided") legend(off) ///
>         lcolor(black) mcolor(black)

.         
. graph export "$path/figure_1_right.pdf", replace
(file ~/Dropbox/voter_id/Replication/figure_1_right.pdf written in PDF format)

. 
. log close
      name:  <unnamed>
       log:  /Users/jesse/Dropbox/voter_id/Replication/figure1_and_a2.log
  log type:  text
 closed on:  17 Aug 2020, 09:30:12
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
